package com.example.tongji;

import com.example.xuetang.R;

import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.Toast;

import com.example.tongji.dati_tongji;
import com.example.tongji.JutiList;

public class zongti_or_juti extends Activity implements OnClickListener{
	Button zongti,juti;
	public static String d[]={};
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		// TODO Auto-generated method stub
		super.onCreate(savedInstanceState);
		setContentView(R.layout.xiangxi_or_tongji);
		
		Intent dati_intent=this.getIntent();
		Bundle data = dati_intent.getExtras();
		d=dati_intent.getStringArrayExtra("abcd");
		
		zongti=(Button)findViewById(R.id.zongti);
		juti=(Button)findViewById(R.id.juti);
		zongti.setOnClickListener(this);
		juti.setOnClickListener(this);
		
	}
	@Override
	public void onClick(View v) {
		// TODO Auto-generated method stub
		switch (v.getId()) {
		case R.id.zongti:
			Intent intent1=new Intent();
			intent1.setClass(zongti_or_juti.this, dati_tongji.class);
			Bundle data1=new Bundle();			
			data1.putStringArray("abcd", d);
			intent1.putExtras(data1);
			startActivity(intent1);			
			break;
			
		case R.id.juti:
			Intent intent2=new Intent();		
			intent2.setClass(zongti_or_juti.this, JutiList.class);
			intent2.putExtra("present_id", d[4]+d[5]);
			startActivity(intent2);		
			break;
			
		}
		
	}

}
